<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
  <meta charset="UTF-8">
  <title>更新用户信息</title>
  <style>
    form {
      width: 300px;
      margin: 50px auto;
      padding: 20px;
      border: 1px solid #ddd;
      border-radius: 5px;
      background-color: #f9f9f9;
    }
    label, input, button {
      display: block;
      width: 100%;
      margin-bottom: 10px;
    }
    label {
      font-weight: bold;
    }
    input {
      padding: 8px;
      box-sizing: border-box;
    }
    button {
      padding: 10px;
      background-color: #4CAF50;
      color: white;
      border: none;
      border-radius: 5px;
      cursor: pointer;
    }
    button:hover {
      background-color: #45a049;
    }
  </style>
</head>
<body>

<form th:action="@{'/updateUser/'+${user.getId()}}" method="post">
  <label for="nickname">昵称:</label>
  <input type="text" id="nickname" name="nickname" th:value="${user.getNickname()}" required>

  <label for="mobile">手机号:</label>
  <input type="text" id="mobile" name="mobile" th:value="${user.getMobile()}" readonly>

  <label for="password">密码:</label>
  <input type="password" id="password" name="password" th:value="${user.getPassword()}" required>

  <label for="totalVolunteerHours">志愿时长:</label>
  <input type="text" id="totalVolunteerHours" name="totalVolunteerHours" th:value="${user.getTotalVolunteerHours()}" readonly>

  <button type="submit">更新</button>
</form>
</body>
</html>